namespace ScrumSprintMonitor.Modules.WorkItemMonitor.ViewModels
{
	#region #using Directives

	using ContinuousLinq.Reactive;

	using UI.Wpf.PostSharp;
	using UI.Wpf.ViewModels;

	#endregion

	public class WorkItemPieChartData : ReactiveObject,
	                                    IWorkItemPieChartData,
	                                    IFirePropertyChanged
	{
		#region IFirePropertyChanged Members

		void IFirePropertyChanged.OnPropertyChanged(string propertyName)
		{
			OnPropertyChanged(propertyName);
		}

		#endregion

		#region IWorkItemPieChartData Members

		[Notify]
		public string StateName { get; set; }

		[Notify]
		public double Value { get; set; }

		[Notify]
		public bool ActualValueCanBeHigher { get; set; }

		public virtual bool ValueIsHours
		{
			get { return false; }
		}

		#endregion

		public override string ToString()
		{
			return string.Format("{0}: {1:N0}", StateName, Value);
		}
	}
}